#include<stdio.h>
class B1
{
    public:
        B1(int i){
            printf("B1 i = %d\n", i);
            printf("B1 construct %p\n", this);
        }
        ~B1(){
            printf("B1 destructing %p\n", this);
        }
};
class B2
{
    public:
        B2(int i){
            printf("B2 i = %d\n", i);
            printf("B2 construct %p\n", this);
        }
        ~B2(){
            printf("B2 destructing %p\n", this);
        }
};
class B3
{
    public:
        B3(){
            printf("B3 construct %p\n", this);
        }
        ~B3(){
            printf("B3 destructing %p\n", this);
        }
};
class C:public B2, public B1, public B3
{
    public:
        C(int a, int b, int c, int d):B1(a), memberB2(b), memberB1(c), B2(d){
            printf("C construct %p\n", this);
        }
    private:
        B1 memberB1;
        B2 memberB2;
        B3 memberB3;
};
int main(int argc, char *argv[])
{
    C obj(1, 2, 3, 4);
    return 0;
}
